:host {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--uib-size);
  width: var(--uib-size);
}

:host([hidden]) {
  display: none;
}

.container {
  position: relative;
  height: var(--uib-size);
  width: var(--uib-size);
}

.container::before,
.container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 50%;
  background-color: var(--uib-color);
  animation: pulse var(--uib-speed) linear infinite;
  transform: scale(0);
  opacity: 0;
  transition: background-color 0.3s ease;
}

.container::after {
  animation-delay: calc(var(--uib-speed) / -2);
}

@keyframes pulse {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
